package com.itheima.eurekafeignclient.service;

import entity.Animal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.http.ResponseEntity;
import java.util.Map;

@FeignClient(name = "eureka-provider")
@Service
public interface FeignService {

        // 接口1：返回字符串
        @RequestMapping("/hello1")
        public String sayHello();
        // 新增方法 - Student
//        @GetMapping("/hello/2")
//        ResponseEntity<Map> getStudent();

        // 新增方法 - Animal
        @RequestMapping("/hello3")
        public ResponseEntity<Animal> getAnimal() ;
}